package heima.FangXing.day10.TreeSet;

import java.util.Comparator;
import java.util.TreeSet;

public class TreeSetDemo4 {

    public static void main(String[] args) {
        TreeSet<String> ts = new TreeSet<>((o1, o2) -> o2.length()-o1.length());
        ts.add("aa");
        ts.add("aaaaaaaa");
        ts.add("aaa");
        ts.add("a");
        System.out.println(ts);

    }
}
